widget: Remove get_valign_with_baseline
authorTimm Bäder <mail@baedert.org>
Sun, 5 Mar 2017 14:18:32 +0000 (15:18 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 5 Mar 2017 14:18:32 +0000 (15:18 +0100)
This only existed for backwards compat reasons which aren't interesting
for gtk4.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkbbox.c
gtk/gtkbox.c
gtk/gtksizerequest.c
gtk/gtkwidget.c
gtk/gtkwidget.h

index 39308f65928b44c297a913c4b3c05853103c4029..b89687d2916f8bb2e5a9d1810eb8812a7a730668 100644 (file)
@@ -4675,7 +4675,6 @@ GtkAlign
 gtk_widget_get_halign
 gtk_widget_set_halign
 gtk_widget_get_valign
-gtk_widget_get_valign_with_baseline
 gtk_widget_set_valign
 gtk_widget_get_margin_start
 gtk_widget_set_margin_start
index 34c338aeafc99c09c72b3dc92b38d45e3a3ad3aa..0928956e222bb1eb710b7c592143ba797c23d485 100644 (file)
@@ -553,7 +553,7 @@ gtk_button_box_child_requisition (GtkWidget  *widget,
           _gtk_widget_get_preferred_size_and_baseline (child,
                                                        &child_requisition, NULL, &child_baseline, NULL);
          if (orientation == GTK_ORIENTATION_HORIZONTAL &&
-             gtk_widget_get_valign_with_baseline (child) == GTK_ALIGN_BASELINE &&
+             gtk_widget_get_valign (child) == GTK_ALIGN_BASELINE &&
              child_baseline != -1)
            {
              have_baseline = TRUE;
@@ -618,7 +618,7 @@ gtk_button_box_child_requisition (GtkWidget  *widget,
               (*heights)[i] = -1;
 
              if (orientation == GTK_ORIENTATION_HORIZONTAL &&
-                 gtk_widget_get_valign_with_baseline (child) == GTK_ALIGN_BASELINE &&
+                 gtk_widget_get_valign (child) == GTK_ALIGN_BASELINE &&
                  child_baseline != -1)
                {
                  (*baselines)[i] = child_baseline;
@@ -639,7 +639,7 @@ gtk_button_box_child_requisition (GtkWidget  *widget,
               (*heights)[i] = child_requisition.height + ipad_h;
 
              if (orientation == GTK_ORIENTATION_HORIZONTAL &&
-                 gtk_widget_get_valign_with_baseline (child) == GTK_ALIGN_BASELINE &&
+                 gtk_widget_get_valign (child) == GTK_ALIGN_BASELINE &&
                  child_baseline != -1)
                (*baselines)[i] = child_baseline;
             }
index 2fbf2bf6f7363904c2f622652604c9b4c520aa20..7e31c0b9d939ed9bc5b8f1e732218a86b3c01345 100644 (file)
@@ -631,7 +631,7 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
          sizes[i].natural_size = child_size;
 
          if (private->orientation == GTK_ORIENTATION_HORIZONTAL &&
-             gtk_widget_get_valign_with_baseline (child->widget) == GTK_ALIGN_BASELINE)
+             gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
            {
              int child_allocation_width;
              int child_minimum_height, child_natural_height;
@@ -976,7 +976,7 @@ gtk_box_size_allocate_with_center (GtkWidget           *widget,
           sizes[packing][i].natural_size = child_size;
 
           if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
-              gtk_widget_get_valign_with_baseline (child->widget) == GTK_ALIGN_BASELINE)
+              gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
             {
               gint child_allocation_width;
              gint child_minimum_height, child_natural_height;
index 907a454b25e3ad3b71745d464672a78912bca0f5..a94dd1d3e4c46a68af8aa5fae8a11153eb95e2b4 100644 (file)
@@ -261,7 +261,7 @@ gtk_widget_query_size_for_orientation (GtkWidget        *widget,
              min_baseline = -1;
              nat_baseline = -1;
            }
-         else if (gtk_widget_get_valign_with_baseline (widget) != GTK_ALIGN_BASELINE)
+         else if (gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE)
            {
              /* Ignore requested baseline for non-aligned widgets */
              min_baseline = -1;
index 188b71388a2df28c0649a83059bafa07f1947a99..6aa80e4a742d7550e47b61009a3d4c52c808647f 100644 (file)
@@ -3422,7 +3422,7 @@ gtk_widget_get_property (GObject         *object,
       g_value_set_enum (value, gtk_widget_get_halign (widget));
       break;
     case PROP_VALIGN:
-      g_value_set_enum (value, gtk_widget_get_valign_with_baseline (widget));
+      g_value_set_enum (value, gtk_widget_get_valign (widget));
       break;
     case PROP_MARGIN_START:
       g_value_set_int (value, gtk_widget_get_margin_start (widget));
@@ -5380,7 +5380,7 @@ gtk_widget_size_allocate_with_baseline (GtkWidget     *widget,
   /* Never pass a baseline to a child unless it requested it.
      This means containers don't have to manually check for this. */
   if (baseline != -1 &&
-      gtk_widget_get_valign_with_baseline (widget) != GTK_ALIGN_BASELINE)
+      gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE)
     baseline = -1;
 
   alloc_needed = priv->alloc_needed;
@@ -12851,48 +12851,20 @@ gtk_widget_set_halign (GtkWidget *widget,
   g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_HALIGN]);
 }
 
-/**
- * gtk_widget_get_valign_with_baseline:
- * @widget: a #GtkWidget
- *
- * Gets the value of the #GtkWidget:valign property, including
- * %GTK_ALIGN_BASELINE.
- *
- * Returns: the vertical alignment of @widget
- *
- * Since: 3.10
- */
-GtkAlign
-gtk_widget_get_valign_with_baseline (GtkWidget *widget)
-{
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_ALIGN_FILL);
-  return widget->priv->valign;
-}
-
 /**
  * gtk_widget_get_valign:
  * @widget: a #GtkWidget
  *
  * Gets the value of the #GtkWidget:valign property.
  *
- * For backwards compatibility reasons this method will never return
- * %GTK_ALIGN_BASELINE, but instead it will convert it to
- * %GTK_ALIGN_FILL. If your widget want to support baseline aligned
- * children it must use gtk_widget_get_valign_with_baseline(), or
- * `g_object_get (widget, "valign", &value, NULL)`, which will
- * also report the true value.
- *
- * Returns: the vertical alignment of @widget, ignoring baseline alignment
+ * Returns: the vertical alignment of @widget
  */
 GtkAlign
 gtk_widget_get_valign (GtkWidget *widget)
 {
-  GtkAlign align;
+  g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_ALIGN_FILL);
 
-  align = gtk_widget_get_valign_with_baseline (widget);
-  if (align == GTK_ALIGN_BASELINE)
-    return GTK_ALIGN_FILL;
-  return align;
+  return widget->priv->valign;
 }
 
 /**
index 0be1d03e64cfbf43d54286efbdfe5475cbf215f6..c1cbe2032aff7424890809360aadf4ad027000e1 100644 (file)
@@ -901,8 +901,6 @@ void     gtk_widget_set_halign        (GtkWidget *widget,
                                        GtkAlign   align);
 GDK_AVAILABLE_IN_ALL
 GtkAlign gtk_widget_get_valign        (GtkWidget *widget);
-GDK_AVAILABLE_IN_3_10
-GtkAlign gtk_widget_get_valign_with_baseline (GtkWidget *widget);
 GDK_AVAILABLE_IN_ALL
 void     gtk_widget_set_valign        (GtkWidget *widget,
                                        GtkAlign   align);